<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/tools.js"></script>
		<script type="text/javascript">
			function $$ (id){
				return document.getElementById(id);
			}
			window.onload = function(){
				var cnv = $$("canvas");
				var cxt = cnv.getContext("2d");
				
				var x =0;
				(function frame(){
					window.requestAnimationFrame(frame);
					cxt.clearRect(0,0,cnv.width,cnv.height);
					cxt.beginPath();
					cxt.arc(x,70,20,0,360*Math.PI/180,true);
					cxt.closePath();
					cxt.fillStyle='#6699FF'
					cxt.fill();
					x+=2;
				})();
//				setInterval(function(){
//					cxt.clearRect(0,0,cnv.width,cnv.height);
//					cxt.beginPath();
//					cxt.arc(x,70,20,0,360*Math.PI/180,true);
//					cxt.closePath();
//					cxt.fillStyle='#6699FF'
//					cxt.fill();
//					x+=2;
//				},16.7)
				
		}
		</script>
	</head>
	<body>
		<canvas id="canvas" width="200" height="150" style="border: 1px dashed gray;"></canvas>
		<p id="txt"></p>
	</body>
</html>
